//
//  RealityModel.m
//  敢唆嘛!
//
//  Created by 教主 on 15/11/24.
//  Copyright © 2015年 zms. All rights reserved.
//

#import "RealityModel.h"

@implementation RealityModel
// 初始化
- (instancetype)initWithObj:(BmobObject *)obj
{
    self = [super init];
    if (self)
    {
        self.objectId = [obj objectForKey:@"objectId"];
        self.userName = [obj objectForKey:@"userName"];
        self.infoTitle = [obj objectForKey:@"infoTitle"];
        self.info = [obj objectForKey:@"info"];
        BmobFile *infoImageFile = [obj objectForKey:@"infoImage"];
        self.infoImage = infoImageFile.url;
        self.type = [obj objectForKey:@"type"];
        self.recommendNumber = [[obj objectForKey:@"recommendNumber"] integerValue];
        self.collectNumber = [[obj objectForKey:@"collectNumber"] integerValue];
        self.commentNumber = [[obj objectForKey:@"commentNumber"] integerValue];
        self.createdAt = [obj createdAt];
        BmobFile *infoTitleImageFile = [obj objectForKey:@"infoTitleImage"];
        self.infoTitleImage = infoTitleImageFile.url;
        self.shareNumber = [[obj objectForKey:@"shareNumber"] integerValue];
    }
    return self;
}
@end
